From 04e403bac97305fab7ccab39db89688a2df4b5fd Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 30 Sep 2003 04:51:37 +0000 Subject: [PATCH] Terminate allocated string. --- gpsbabel/util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gpsbabel/util.c b/gpsbabel/util.c index 0bd965b81..5219a6606 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -171,6 +171,7 @@ xstrndupt(const char *str, size_t sz) newstr = xmalloc(newlen + 1); memcpy(newstr, str, newlen); + newstr[newlen+1] = '\0'; rtrim(newstr); return newstr; -- 2.30.2